round

pure function round(): decimal

Rounds up to the nearest integer number.

Since

0.9.1


pure function round(digits: integer): decimal

Rounds to a specific number of decimal places.

Example:

>>> (123.456).round(-1)
120
>>> (123.456).round(1)
123.5

Since

0.9.1

Parameters

digits

Which decimal place to round the value to. A positive number means after the decimal point and negative number means before.